package com.itlong.cloud.POJO.PO;

import com.itlong.cloud.annotation.ItlField;
import com.itlong.cloud.annotation.ItlTables;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <desc>
 * 资金变动明细实体类PO.
 * </desc>
 *
 * @createDate 2018/9/20
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ItlTables("amount_change_info")
public class AmountChangeInfoPO extends BasePO implements Serializable {

    @ItlField(value = "change_id",logicKey = "key")
    private String changeId;                //变动明细ID 逻辑ID
    @ItlField("project_id")
    private String projectId;               //项目编号
    @ItlField("third_party_payment")
    private Integer thirdPartyPayment;      //第三方支付 1微信支付 2银联支付
    @ItlField("trade_before_amount")
    private BigDecimal tradeBeforeAmount;   //交易前余额
    @ItlField("trade_amount")
    private BigDecimal tradeAmount;         //交易金额
    @ItlField("trade_after_amount")
    private BigDecimal tradeAfterAmount;    //交易后余额
    @ItlField("handling_fee")
    private BigDecimal handlingFee;         //手续费
    @ItlField("trade_type")
    private Integer tradeType;              //交易类型 1物业抄表费  2维修费 3停车费 4微信商户 5微信提现 6备付金充值 7银联转账 8物业提现 9物业增值
    @ItlField("out_order_num")
    private String outOrderNum;             //外部订单编号
    @ItlField("operate")
    private String operate;                 //操作人
    @ItlField("remark")
    private String remark;                  //备注

    public AmountChangeInfoPO(String changeId, BigDecimal tradeAmount, String outOrderNum, String operate, String remark) {
        this.changeId = changeId;
        this.tradeAmount = tradeAmount;
        this.outOrderNum = outOrderNum;
        this.operate = operate;
        this.remark = remark;
    }

    @Override
    public String toString() {
        return "AmountChangeInfoPO{" +
                "changeId='" + changeId + '\'' +
                ", projectId='" + projectId + '\'' +
                ", thirdPartyPayment=" + thirdPartyPayment +
                ", tradeBeforeAmount=" + tradeBeforeAmount +
                ", tradeAmount=" + tradeAmount +
                ", tradeAfterAmount=" + tradeAfterAmount +
                ", handlingFee=" + handlingFee +
                ", tradeType=" + tradeType +
                ", outOrderNum='" + outOrderNum + '\'' +
                ", operate='" + operate + '\'' +
                ", remark='" + remark + '\'' +
                '}';
    }
}